# frozen_string_literal: true
# == Schema Information
#
# Table name: buildings
#
#  id         :integer          not null, primary key
#  village_id :integer
#  editor_id  :integer
#  code       :string
#  created_at :datetime         not null
#  updated_at :datetime         not null
#  alias_name :string
#
# Indexes
#
#  index_buildings_on_editor_id   (editor_id)
#  index_buildings_on_village_id  (village_id)
#

class Building < ApplicationRecord
  has_many :users
  has_many :guests

  belongs_to :village
  belongs_to :editor, optional: true
end
